<template>
  <div>
    <Form layout="inline" :model="formState">
      <FormItem label="企业名称">
        <Input v-model:value="formState.name" style="width: 200px" placeholder="请输入"></Input>
      </FormItem>
      <div>
        <Tooltip title="查询">
          <Button type="primary" @click="search" shape="circle"
            ><template #icon><SearchOutlined /></template
          ></Button>
        </Tooltip>
        <Tooltip title="重置">
          <Button style="margin-left: 10px" @click="reset" shape="circle"
            ><template #icon><ReloadOutlined /></template
          ></Button>
        </Tooltip>
      </div>
    </Form>
  </div>
</template>
<script lang="ts" setup>
import { Tooltip, Form, FormItem, Button, Input } from 'ant-design-vue';
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import { EtpMgtTableParams } from '/@/api/tenant-mgmt/enterpriseManagement/model/enterpriseManagementModel';

let formState = ref({} as EtpMgtTableParams);

const emit = defineEmits(['get']);
const search = () => {
  emit('get', formState.value);
};

const reset = () => {
  formState.value = {} as EtpMgtTableParams;
  emit('get', formState.value);
};
</script>
